<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <TestComponent msg="子应用调用一下试试" />
  </div>
</template>

<script lang="ts">
import { defineComponent, defineAsyncComponent } from "vue";
// import TestUtil from "federation/TestUtil";
// import { TestUtil } from "../remoteConfig/remoteRef";
import { TestUtil } from "@/remoteConfig/remoteRefTest";

export default defineComponent({
  // components: {
  //   // TestComponent: () => import("federation/TestComponent"),
  //   TestComponent: defineAsyncComponent(
  //     () => import("federation/TestComponent")
  //   ),
  //   // TestComponent: defineAsyncComponent({
  //   //   loader: () => import("federation/TestComponent"),
  //   //   delay: 200, // 延迟加载时间，单位为毫秒
  //   //   timeout: 3000, // 超时时间，单位为毫秒
  //   // }),
  // },
  name: "HelloWorld",
  props: {
    msg: String,
  },
  setup() {
    TestUtil();
    return {};
  },
});
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
// .hello {
//   background-color: #a1b942;
// }
</style>
